<?php
include_once '../data/database_dal.php';

class FolderDAL extends DatabaseDAL
{
    function update($id, $name, $userID, $url, $inTime, $inUser)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_folder_update('". $id ."', '". $name ."', '". $userID ."', '". $url ."', '". $inTime ."', '". $inUser ."',)");
        $this->close();
        return $result;
    }


    function get($where)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_folder_get(".'"'. $where .'"'.")");
        $this->close();
        return $result;
    }

    function getAll($orderBy)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_folder_list(".'"'. $orderBy .'"'.")");
        $this->close();
        return $result;
    }

    function delete($id)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_folder_delete('". $id ."')");
        $this->close();
        return $result;
    }

    function validate($id, $name)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_folder_validate('". $id ."', '". $name ."')");
        $this->close();
        return $result;
    }
}

?>
